#ifndef SERVICE_URL_H
#define SERVICE_URL_H
#include <string>

namespace vpm
{
	namespace mina
	{
		//represent a service address, like:
		// tcp://192.168.0.111:1900 
		// when used for client, the client will connect to 192.168.0.111:1900
		//see the definition of the url http://www.ietf.org/rfc/rfc1738.txt
		//not finished 
		class ServiceUrl
		{
		public:
			enum SchemeType
			{
				NONE,
				TCP,
				UDP,
				//...
			};

			ServiceUrl(const std::string & url);

			SchemeType schemeType;
			std::string scheme; 			
			std::string host; 
			int port;
			std::string urlPath; //url path should be different from schemes, so it should be parsed in other way 

			void to_string();
		private:
			std::string m_url; 
		};
	}
}


#endif // SERVICE_URL_H


